package com.hspedu.tankgame4;

import javax.swing.*;

public class HspTankGame04 extends JFrame {
    //定义MyPanel
    TankPanel mp = null;
    public static void main(String[] args) {
        HspTankGame04 hspTankGame04 = new HspTankGame04();

    }
    public HspTankGame04(){
        mp = new TankPanel();
        Thread thread = new Thread(mp);
        thread.start(); //启动TankPanel线程
        this.add(mp);
        this.addKeyListener(mp);
        this.setSize(1000,950);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}
